package cn.laikyy.lfp.controller;

import cn.laikyy.lfp.biz.IUserBiz;
import cn.laikyy.lfp.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("user")
public class UserController {

    /**
     * 注入用户biz
     */
    @Resource
    private IUserBiz userBiz;

    /**
     * @Description: 页面菜单
     * @return:
     * @author laikyy
     * @date 2018/1/25 23:14
     */
    @RequestMapping(value = "/forward", method = RequestMethod.GET)
    public String get() {
        return "user";
    }

    @RequestMapping(value="/findUserByCondition",method= RequestMethod.GET)
    @ResponseBody
    public List<User> findUserByCondition(User user){
        return userBiz.findUserByCondition(user);
    }
}
